<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<style type="text/css">
.area{
float:left;
width:70px;
list-style-type:none;
}
</style>
<div class="pageContent">
	<form method="post" 
		action="dept_bindArea.action"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" name="deptId" value="${deptId }">
		<div class="pageFormContent nowrap" layoutH="60">
			<table border="0">
				<tr>
					<td><dl>
							<dt>
								<label>部门名称：</label>
							</dt>
						</dl>
					</td>
					<td>${deptName}</td>
				</tr>
				<tr>
					<td>
						<dl>
							<dt>
								<label>管辖地区：</label>
							</dt>
						</dl>
					</td>
					<td>
						<c:forEach items="${application.areaList}" var="area">
				   			
				   			<ul class="area">
				   				<li><input type="checkbox" 
				   				<c:forEach items="${deptAreaList}" var="deptArea">
				   					<c:if test="${area.areaCode eq deptArea.areaCode }">checked</c:if>
				   				</c:forEach>
				   				
				   				 name="areaCodes"  ${areaCode==area.areaCode?"selected":""} value="${area.areaCode}"/>${area.areaName}</li>
				   			 </ul>
						</c:forEach>
					</td>
				</tr>
			</table>
			<%-- <dl>
				<dt>
					<label>部门名称：</label>
				</dt>
				<input type="text" value="${deptName}" disabled="disabled"/>
			</dl>
			<dl>
				<dt>
					<label>管辖地区：</label>
				</dt>
				<c:forEach items="${application.areaList}" var="area">
				   <ul><li><input type="checkbox" name="areaCode" value="${area.areaCode}"/>${area.areaName}
					</li></ul>
				</c:forEach>
			</dl> --%>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">保存</button>
						</div>
					</div></li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>
</div>
